<?php
/**
 * @Author: Marte
 * @Date:   2017-08-21 10:02:21
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-24 10:20:44
 */
function getImageNameByPid($pid){
    $sql='select name from thumb where pid='.$pid;
    $rows=fetchall($sql);
    return $rows;
}
function doWaterImage($id){
  $res=getImageNameByPid($id);
  foreach($res as $v){
    $files="../uploads/300/".$v['name'];
    waterPic($files);

  }
return '添加成功';
}
function doWaterText($id){
    $res=getImageNameByPid($id);
  foreach($res as $v){
    $files="../uploads/300/".$v['name'];
    waterText($files);
  }
return '添加成功';


}

function getOneImageNameByPid($pid){
    $sql='select name from thumb where pid='.$pid;
    $rows=fetchone($sql);
    return $rows;
}